package item;

import loadsave.Memento;
import loadsave.loadsaveobject.LoadSaveObject;
import loadsave.loadsaveobject.LoadSaveObjectComposite;
import inventory.EquipLocation;
import visitors.TakeableItemVisitor;

public class Staff extends EquipableItem {

	public Staff( String name ) {
        super(name);
        setEquipLocation(EquipLocation.WEAPON);
    }
	
    /**
     * have the visitor visit this item to pick it up
     */
	public void accept(TakeableItemVisitor visitor) {
		visitor.visitStaff(this);
	}

	//I AM A WIIIIZZAAARDDDDDDDD
	//I put on my robe and wizard hat
	
    @Override
    public Memento getMemento() {
        return new Memento() {

			@Override
			public LoadSaveObject getState() {
				LoadSaveObject toReturn = Staff.super.getMemento().getState();
				toReturn.setType("Staff");
				return toReturn;
			}

			@Override
			public void restoreState(LoadSaveObject lso) {
				Staff.super.getMemento().restoreState(lso);
			}
        	
        };
    }
    
    public Staff() { }
    
    @Override
	public Staff clone() {
		Staff toReturn = new Staff();
		toReturn.getMemento().restoreState(this.getMemento().getState());
		return toReturn;
	}
}
